package book;

import java.util.Scanner;

public class TextEx6 {

	public static void main(String[] args) {
		try {
			String teachers[] = {"柳海龙","孙传杰","孙悦"};
			for(int i =0;i<teachers.length;i++) {
				System.out.println(teachers[i]);
		}
			int appleNum=0;//苹果数
			int stuNum=0; //学生数
			System.out.println("***现在给孩子们发苹果***");
			Scanner input = new Scanner(System.in);
			System.out.println("请输入桌子上有几个苹果：");
			appleNum = input.nextInt();
			System.out.println("请输入班上有几个孩子：");
			stuNum=input.nextInt();
			System.out.println("班上每个孩子分的几个苹果："+appleNum/stuNum);
			System.out.println("孩子们很开心！");

	}catch(Exception e) {
		System.out.println("数组下标越界，请修改程序！");
	}
		System.out.println("显示完毕！");

	
	}
	

}
